﻿@using BonjourQuotation.UI.Models.PartialModel
@model QuotationDetailViewModel
@{
       
}
<div class="container" style="width: 1188px !important; background-color: rgba(128, 128, 128, 0.8); padding-bottom: 10px; padding-left: 10px;">
   
    
    @Html.HiddenFor(model => model.QuotaDetailMessage)
    
    @if (!Model.QuotaConfirmed)
    {
    <div class="row form-row pull-left" >
        <div class="col-lg-1" style="width: 13% !important;">
            <span class="checkbox checkboxes">
                <label>
                    @Html.CheckBoxFor(model => model.QuotaConfirmed, new { @class = "QuotaDetControls" })
                    @Html.LabelFor(model => model.QuotaConfirmed, new { @class = "ColorRed", @style = "font-weight:800;" })
                </label>
            </span>
        </div>
    </div>
    }
        @if (Model.QuotaConfirmed)
        {
            <div class="row form-row" style="margin-bottom:10px;">
                <div style="@(@Model.GroupIsGir ? "" : "display:none")" id="QuotaGirGroupDiv">
                    <div class="createidgroup col-lg-2 pull-left">
                        <div class="input-group">
                            <button class="btm btn2" type="button" onclick="CreateGirGroupBtnClick()">Create Gir Group</button>
                        </div>
                    </div>
                </div>
                <div id="QuotaNonGirGroupDiv" style="@(@Model.GroupIsGir ? "display:none": "")">
                    <div class="createidgroup col-lg-2 pull-left">
                        <div class="input-group">
                            <button class="btm btnGrp" type="button" onclick="CreateGroupSeriesBtnClick()">Create Group</button>
                        </div>
                    </div>
                </div>
                <div class=" col-lg-1" style="width: 10% !important;">
                    <div class="input-group" style="padding-right:3px;">
                        <span id="gircheck" class="checkbox checkboxes">
                            @Html.LabelFor(model => model.GroupIsGir, new { @class = "input-group-addon1 ColorRed", @style = "font-weight:800;" })
                            @Html.CheckBoxFor(model => Model.GroupIsGir, new { @class = "QuotaDetControls" })
                        </span>
                    </div>
                </div>
                    <div class="col-lg-1" style="margin-left: -20px; width: 13% !important;">
                        <span class="checkbox checkboxes">
                            <label>
                                @Html.CheckBoxFor(model => model.QuotaConfirmed, new { @class = "QuotaDetControls ", @disabled = "disabled" })
                                @Html.LabelFor(model => model.QuotaConfirmed, new { @class = "ColorRed", @style = "font-weight:800;" })
                            </label>
                        </span>
                    </div>
                </div>
            @*<div id="QuotaNonGirGroupDiv" style="@(@Model.GroupIsGir ? "display:none": "")">
                <div class="row form-row" style="margin-bottom:10px;">

                    <div class=" col-lg-2">
                        <div class="input-group">
                            @Html.LabelFor(model => model.GroupID, new { @class = "input-group-addon" })
                            @Html.TextBoxFor(model => Model.GroupID, new { @class = "form-control", @readonly = true })
                        </div>
                    </div>
                    <div class="col-lg-2">
                        <div class="input-group">
                            <span class="input-group-addon">@Html.LabelFor(model => model.GroupCode)</span>
                            @Html.TextBoxFor(model => model.GroupCode, new { @class = "form-control QuotaDetControls" })
                        </div>
                    </div>
                    <div class="col-lg-3">
                        <div class="input-group">
                            <span class="input-group-addon">@Html.LabelFor(model => model.GroupName)</span>
                            @Html.TextBoxFor(model => model.GroupName, new { @class = "form-control QuotaDetControls" })
                        </div>
                    </div>
                    <div class=" col-lg-2" style="width: 13% !important;">
                        <div class="input-group">
                            <span class="input-group-addon">@Html.LabelFor(model => model.GroupEstPax)</span>
                            @Html.TextBoxFor(model => model.GroupEstPax, new { @class = "form-control QuotaDetControls" })
                        </div>
                    </div>
                    <div class=" col-lg-2">
                        <div class="input-group">
                            <span class="input-group-addon">@Html.LabelFor(model => model.GroupEstRooms)</span>
                            @Html.TextBoxFor(model => model.GroupEstRooms, new { @class = "form-control QuotaDetControls" })
                        </div>
                    </div>
                </div>
                <div class="row form-row" style="margin-bottom:10px;">
                    <div class=" col-lg-2 pull-left">
                        <div class="input-group">
                            <button class="btm btn-success" type="button" onclick="CreateGroupBtnClick()">Create Group</button>
                        </div>
                    </div>
                    <div class=" col-lg-2 pull-left">
                        <div class="input-group">
                            <button class="btm btn-success" type="button" onclick="SaveGroupBtnClick()">Save Group</button>
                        </div>
                    </div>

                    <div class=" col-lg-2 pull-left">
                        <div class="input-group">
                            <button class="btm btn-success" type="button" onclick="CreateGroupSeriesBtnClick()">Create Group Series</button>
                        </div>
                    </div>
                </div>
            </div>*@
        }
        <div id="row1" class="row form-row ">
            <div class=" col-lg-2" style="width: 15% !important;">
                <div class="input-group inpputgr" style="background-color: rgb(233, 170, 170)">
                    @Html.LabelFor(model => model.QuotaID, new { @class = "input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback", @style="font-weight:700;" })
                    @*@Html.TextBoxFor(model => model.QuotaID, new { @class = "form-control" })*@
                    @Html.HiddenFor(model => model.QuotaID)
                    @Html.HiddenFor(model => model.QuotaIden)
                    @Html.LabelForModel(Model.QuotaID, new { @class = "form-control inpputgr table_inputs_SmallPadding2", @style = "padding-top:7px !important;font-weight:1000 !important; color:red !important;  " })
                </div>
            </div>
            @Html.HiddenFor(model => model.QuotaCode)
            @*<div class=" col-lg-5" style="width: 22% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.QuotaCode)</span>
                    @Html.TextBoxFor(model => model.QuotaCode, new { @class = "form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>*@
            <div class="col-lg-5" style="width: 42% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.CustomerId)</span>
                    @Html.DropDownListFor(x => x.SelectedCustomerId, new SelectList(Model.CustomerId, "Value", "Text"), "Select", new { @class = "form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
            <div class=" col-lg-4 pull-right" style="width: 25% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.EmployeeId)</span>
                    @Html.DropDownListFor(x => x.SelectedEmployeeId, new SelectList(Model.EmployeeId, "Value", "Text"), "Select", new { @class = "form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
            <div class=" col-lg-2" style="width: 18% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.Region)</span>
                    @Html.DropDownListFor(x => x.SelectedRegion, new SelectList(Model.Region, "Value", "Text"), "Select", new { @class = "form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
        </div>
        <div class="row form-row" style="margin-top: 0">
            <div class="col-lg-8" style="width: 41% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.QuotaName)</span>
                    @Html.TextBoxFor(model => model.QuotaName, new { @class = "form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>

            <div class=" col-lg-3" style="width: 15% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.NoOfFlights)</span>
                    @Html.TextBoxFor(model => model.NoOfFlights, new { @class = "form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
            <div class=" col-lg-2" style="width: 19% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.QuotaCountry)</span>
                    @Html.DropDownListFor(model => model.SelQuotaCountry, new SelectList(Model.QuotaCountry, "Value", "Text"), new { @class = "form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
           
            <div class=" col-lg-2" style="width: 25% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.Season)</span>
                    @Html.DropDownListFor(x => x.SelectedSeason, new SelectList(Model.Season, "Value", "Text"), new { @class = "form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
        </div>

        <div class="row form-row">
            <div class=" col-lg-3" style="width: 12% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.NoNights)</span>
                    @Html.TextBoxFor(model => model.NoNights, new { @class = "QuotaOnlyDigits QuotaTextBx form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr ColorRed", @style = "font-weight:700" })
                </div>
            </div>
            <div class=" col-lg-3" style="width: 12% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.NoOfMeals)</span>
                    @Html.TextBoxFor(model => model.NoOfMeals, new { @class = "QuotaOnlyDigits form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr ColorRed",   @style="font-weight:700" })
                </div>
            </div>
            <div class=" col-lg-3" style="width: 19% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.ArrivalDate)</span>
                    @Html.TextBoxFor(model => model.ArrivalDate, new { @class = "form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
            <div class=" col-lg-3 " style="width: 19% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.ArrivalCity)</span>
                    @Html.DropDownListFor(x => x.SelectedArrivalCity, new SelectList(Model.ArrivalCity, "Value", "Text"), "Select", new { @class = "form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
            <div class=" col-lg-3" style="width: 18% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.DepartureDate)</span>
                    @Html.LabelForModel(Model.DepartureDate, new { @class = "form-control form-control-DepartureDate table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
            <div class=" col-lg-3 " style="width: 20% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.DepartureCity)</span>
                    @Html.DropDownListFor(x => x.SelectedDepartureCity, new SelectList(Model.DepartureCity, "Value", "Text"), "Select", new { @class = "form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
        </div>
        <div class="row form-row">       
            <div class=" col-lg-2" style="width: 11% !important;">
                <div class="input-group">
                    <span class="input-group-addon table_inputs_SmallPadding2 inpputgrtext inpputgrback">@Html.LabelFor(model => model.MaxNoOfPax)</span>
                    @Html.TextBoxFor(model => model.MaxNoOfPax, new { @class = "QuotaOnlyDigits form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
            <div class=" col-lg-2" style="width: 11% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.MinNoOfPax)</span>
                    @Html.TextBoxFor(model => model.MinNoOfPax, new { @class = "QuotaOnlyDigits form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
            <div class=" col-lg-2" style="width: 8% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.IncNoOfPax)</span>
                    @Html.TextBoxFor(model => model.IncNoOfPax, new { @class = "QuotaOnlyDigits form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>

            <div class=" col-lg-4 pull-left" style="width: 27% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.HFreeRoom)</span>
                    @Html.TextBoxFor(model => model.HFreeRoom, new { @class = "QuotaOnlyDigits form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback" style="border: 0">free per</span>
                    @Html.TextBoxFor(model => model.HForPaid, new { @class = "QuotaOnlyDigits form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.HForPaid)</span>
                </div>
            </div>
            <div class=" col-lg-4 pull-left" style="width: 30% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.OFreeService)</span>
                    @Html.TextBoxFor(model => model.OFreeService, new { @class = "QuotaOnlyDigits form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback" style="border: 0">free per</span>
                    @Html.TextBoxFor(model => model.OForPaid, new { @class = "QuotaOnlyDigits form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback" style="border: 0">-</span>
                    @Html.TextBoxFor(model => model.MaxNoOfPax, new { @class = "QuotaOnlyDigits form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr", @readonly = true })
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.MaxNoOfPaxDis)</span>
                </div>
            </div>
      
        </div>

        <div class="row form-row">
            <div class="col-lg-4" style="width: 22% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.FreeCalcType)</span>
                    @Html.DropDownListFor(x => x.SelectedFreeCalcType, new SelectList(Model.FreeCalcType, "Value", "Text"), new { @class = "form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
            <div class=" col-lg-2" style="width: 10% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback ">@Html.LabelFor(model => model.profit)</span>
                    @Html.TextBoxFor(model => model.profit, new { @class = "QuotaOnlyDecimalDigits QuotaTextBx form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
            
            <div class=" col-lg-3" style="width: 19% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.QuotaDate)</span>
                    @Html.LabelForModel(Model.QuotaDate, new { @class = "form-control table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
            <div class=" col-lg-3" style="width: 21% !important;">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.LastUpDate)</span>
                    @Html.LabelForModel(Model.LastUpDate, new { @class = "form-control table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
        </div>

        <div class="row form-row" style="margin-top: 10px; margin-bottom: 10px;">
            <div class="col-lg-5" style="width: 42% !important;">
                <div class="input-group downloadshow">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.Proposal)</span>
                    @Html.TextBoxFor(model => model.Proposal, new { @class = "form-control QuotaDetControls inpputgr table_inputs_SmallPadding2 inputfile", @readonly = true })
                </div>
            </div>
          
            <div class="col-lg-7" style="width: 58% !important;">
                @using (Html.BeginForm("UploadProposal", "Quotation", FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-inline" }))
                {
                    @Html.HiddenFor(model => model.QuotaIden)
                    <div class="input-group pull-right">
                        @if (Model.QuotaDetailDownloadProposalView)
                        {
                            if (!(Model.QuotaConfirmed))
                            { 
                                <input type="file" name="ProposalFile" class="form-control btn btn-primary btn7" id="ProposalFile" style="width:420px" />
                            }
                            <input type="button" class="btn btn-primary input-group-addon inpputgr btn8" onclick="window.open('../Quotation/ViewProposal?QuotaID=@Model.QuotaIden&DocumentName=@Model.Proposal')" value="Download Proposal" style="width:134px;height:34px;">
                        }
                        @if (Model.QuotaDetailUploadProposalView && !(Model.QuotaConfirmed))
                        { 
                            <input type="submit" style="display:none;" id="UploadProposal">
                        }
                    </div>
                }
            </div>
        </div>
        <div class="row form-row" style="margin-bottom: 10px">
            <div class="col-lg-12">
                <div class="input-group">
                    <span class="input-group-addon inpputgrtext table_inputs_SmallPadding2 inpputgrback">@Html.LabelFor(model => model.QuotaNote)</span>
                    @Html.TextBoxFor(model => model.QuotaNote, new { @class = "form-control QuotaDetControls table_inputs_SmallPadding2 inpputgr" })
                </div>
            </div>
        </div>
    <div class="form-row" style="padding-left: 5px;">
        <div class="col-lg-4 btn-group" style="margin-left: -17px; width: 100%;">
            @if (Model.QuotaDetailNewBtnView)
            {    
                <input type="button" id="NewBtn" class="btn14" value="New">
            }
            @if (Model.QuotaDetailSaveBtnView && !(Model.QuotaConfirmed))
            {
                <input type="button" id="SaveBtn" class="btn14" value="Save">
            }
            @if(Model.QuotaDetailSaveAsBtnView)
            {
                <input type="button" id="SaveAsBtn" class="btn14" value="Save As">
            }
            @if(Model.QuotaDetailPreviewBtnView)
            {
                <input type="button" id="ReportBtn" class="btn14 btn120" value="Preview / Print">
                <input type="checkbox" id="ReportSmallChb" >
            }
            <button type="button" style="float:right" class="btn14 btn-danger" onclick="LockUnLockQuotation()" id="QuotaLockUnLockButton">UnLock</button>
        </div>
    </div>

    </div>

    <div id="QuotaGirGroupGridDiv" style="display:none;"></div>


    <div id="LoadingDiv" style="display:none;">
        <img alt="loading" src="../../Content/Images/AjaxLoader.gif" />
    </div>


    <div id="MsgDiv" style="display:none;">
        <span class="WarningIcon">
            <img src="~/Content/Images/warning_icon.png" />
        </span>
        <span id="MsgContent"></span>
    </div>



